// 发起ajax 请求渲染导航模块中的数据
show_nav = function() {
  $.ajax({
    type: "get",
    url: "/showNav",
    data: {
      nav_href: window.location.pathname
    },
    success: function(data) {
      let show_nav_html = template("top_nav", { list: data });
      $(".com_nav_center_center_right_ul").html(show_nav_html);

      let left_title_html = template("left_title", {
        data: data[2][0].name
      });

      $(".com_sidebar_top_title").html(left_title_html);
      let left_nav_html = template("left_nav", { list: data[3] });
      $(".com_sidebar_top_hbody").html(left_nav_html);
    }
  });
};
show_nav();
